Skip to content

refactor: remove folder/workspace from vsCodeCliArgs - #4932

Merged
jsjoeio merged 14 commits into
mainfrom
jsjoeio/fix-folder-workspace-cli-args
Mar 2, 2022
Merged

jsjoeio merged 14 commits into
mainfrom
jsjoeio/fix-folder-workspace-cli-args

Conversation

@jsjoeio

@jsjoeio jsjoeio commented Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

Since we handle this in the vscode.ts route, we no longer need to pass it to VS
Code as a CLI arg since it's deprecated on that side.

This adds logic to our vscode route handler to handle both folder and workspace paths passed in via the CLI

Fixes an issue related to coder/vscode#45

Blocked by coder/vscode#49

@jsjoeio
jsjoeio temporarily deployed to CI March 1, 2022 22:00 Inactive
@github-actions

github-actions Bot commented Mar 1, 2022 •

Copy link
Copy Markdown

✨ Coder.com for PR #4932 deployed! It will be updated on every commit.

@jsjoeio
jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from aa44e6c to 6be88d7 Compare March 1, 2022 23:22
@jsjoeio jsjoeio mentioned this pull request Mar 1, 2022
28 tasks done
@jsjoeio
jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from 6be88d7 to c2ecce1 Compare March 1, 2022 23:29
@jsjoeio
jsjoeio temporarily deployed to CI March 1, 2022 23:29 Inactive
@jsjoeio jsjoeio self-assigned this Mar 1, 2022
@jsjoeio jsjoeio modified the milestones: 4.0.3, March 2022 Mar 1, 2022
@jsjoeio
jsjoeio marked this pull request as ready for review March 1, 2022 23:30
@jsjoeio
jsjoeio requested a review from a team March 1, 2022 23:30

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A much cleaner paradigm!

Comment thread src/node/cli.ts Resolved
Comment thread src/node/cli.ts Resolved
Comment thread src/node/routes/vscode.ts Resolved
Comment thread src/node/routes/vscode.ts Resolved
Comment thread src/node/routes/vscode.ts Resolved
Comment thread src/node/routes/vscode.ts Resolved
Comment thread test/unit/node/routes/vscode.test.ts Resolved
Comment thread test/unit/node/routes/vscode.test.ts Resolved
Comment thread test/unit/node/routes/vscode.test.ts Resolved
@jsjoeio
jsjoeio temporarily deployed to CI March 2, 2022 20:20 Inactive
@jsjoeio
jsjoeio temporarily deployed to CI March 2, 2022 21:06 Inactive
@jsjoeio
jsjoeio temporarily deployed to CI March 2, 2022 21:20 Inactive
@jsjoeio

jsjoeio commented Mar 2, 2022

Copy link
Copy Markdown
Contributor Author

Argh, this won't pass CI until I remove those args in the VS Code side, merge and then update here.

Comment thread src/node/routes/vscode.ts Resolved
@jsjoeio
jsjoeio force-pushed the jsjoeio/fix-folder-workspace-cli-args branch from 1cd9aa8 to 4ffd923 Compare March 2, 2022 21:49
Comment thread src/node/routes/vscode.ts Resolved
Co-authored-by: Asher <ash@coder.com>
@jsjoeio
jsjoeio temporarily deployed to CI March 2, 2022 21:59 Inactive

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great refactor!

@jsjoeio
jsjoeio temporarily deployed to npm March 2, 2022 22:16 Inactive
@codecov

codecov Bot commented Mar 2, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4932 (8162fba) into main (0e78a14) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4932      +/-   ##
==========================================
+ Coverage   70.16%   70.29%   +0.13%     
==========================================
  Files          29       29              
  Lines        1666     1670       +4     
  Branches      369      369              
==========================================
+ Hits         1169     1174       +5     
+ Misses        423      422       -1     
  Partials       74       74              
Impacted Files Coverage Δ
src/node/cli.ts 84.29% <100.00%> (-0.53%) ⬇️
src/node/routes/vscode.ts 83.54% <100.00%> (+3.24%) ⬆️
src/node/http.ts 70.40% <0.00%> (+1.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b018112...8162fba. Read the comment docs.

@jsjoeio
jsjoeio merged commit 78658f1 into main Mar 2, 2022
@jsjoeio
jsjoeio deleted the jsjoeio/fix-folder-workspace-cli-args branch March 2, 2022 22:36
@jsjoeio jsjoeio modified the milestones: March 2022, 4.0.3 Mar 3, 2022
TinLe pushed a commit to TinLe/code-server that referenced this pull request Apr 23, 2022
* refactor: remove folder/workspace from vsCodeCliArgs

Since we handle this in the vscode.ts route, we no longer need to pass it to VS
Code as a CLI arg since it's deprecated on that side.

* feat(vscode): redirect to folder from cli

* Update src/node/routes/vscode.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: update _: type

* fixup!: move vars to lower if block

* fixup!: share redirect block

* fixup!: mmove req.query.ew block into if

* fixup!: refactor vscode tests

* refactor: make vscode.ts logic easier to read

* fixup!: fix broken tests and clean up logic

* chore: upgrade vscode version

* fixup!: delete unnecessary if closed block

* Update src/node/routes/vscode.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: rename to FOLDER_OR_WORKSPACE_WAS_CLOSED

Co-authored-by: Asher <ash@coder.com>

This branch was previously deployed

2 inactive deployments
npm — 8162fba8 Deployed Mar 2, 2022 by jsjoeio
CI — 8162fba8 Deployed Mar 2, 2022 by jsjoeio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants